package com.daedalus.Gui.other.ylberi;

import javax.swing.*;
import java.awt.*;

public class drawRainbow extends JPanel{
	Color[] ngjyrat= {Color.green,Color.pink,Color.blue, Color.red, Color.yellow, Color.orange.darker(), Color.MAGENTA };
	int no_of_Arcs=7;
	
	public void paintComponent(Graphics g){
		super.paintComponent(g);
		int x,y,d,r,count;
		x=0; y=0; d=this.getWidth(); r=d; count=0;
	this.setBackground(Color.cyan);
	  while(count<no_of_Arcs){
		g.setColor(ngjyrat[count]);
		g.fillArc(x, y, d, r, 0, 180);
		x+=20;
		d-=40;
		r-=40;
		y+=20;
		count++;
	}
	  Color a=this.getBackground();
	  g.setColor(a);
	  g.fillArc(x, y, d, r, 0, 180);
	  
		
		
	}
	

}
